package com.xauto.pioneer.appuser.activity.user_aptitude;

import android.content.Intent;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

import com.xauto.pioneer.appuser.MyApplication;
import com.xauto.pioneer.appuser.R;
import com.xauto.pioneer.appuser.activity.BaseActivity;
import com.xauto.pioneer.appuser.activity.common.TakePhotoActivity;
import com.xauto.pioneer.appuser.activity.mine.balance.BankListActivity;
import com.xauto.pioneer.appuser.http.BaseLHttpHandler;
import com.xauto.pioneer.appuser.http.Constants;
import com.xauto.pioneer.appuser.http.LHttpLib;
import com.xauto.pioneer.appuser.interfaces.MemberCallBack;
import com.xauto.pioneer.appuser.model.Image;
import com.xauto.pioneer.appuser.model.JSONStatus;
import com.xauto.pioneer.appuser.model.Member;
import com.xauto.pioneer.appuser.util.DataCheckUtil;
import com.xauto.pioneer.appuser.util.DataLoadUtil;
import com.xauto.pioneer.appuser.util.StringUtils;
import com.xauto.pioneer.appuser.util.TimeUtil;
import com.xauto.pioneer.appuser.util.ToastUtil;
import com.xauto.pioneer.appuser.util.ViewUtil;
import com.xauto.pioneer.appuser.view.TopBar;

import butterknife.Bind;
import butterknife.OnClick;

import static com.xauto.pioneer.appuser.activity.common.TakePhotoActivity.DO_BIG_IMAGE;
import static com.xauto.pioneer.appuser.activity.common.TakePhotoActivity.UPLOAD_IMG;
/***
 * new
 * 租车审核流程 页面
 * @author Lemon Fri 3 Mar 10:55
 */

public class UserAptitudeFlowActivity extends BaseActivity {

    @Bind(R.id.topBar)
    TopBar topBar;
    /****************** 身份证照片正反相关 view *****************/
    @Bind(R.id.layoutVerifyIdentity)
    View layoutVerifyIdentity;
    /** 显示-身份证正面图片*/
    @Bind(R.id.ivIdInfo_first)
    ImageView ivIdInfo_first;
    /** 显示-身份证反面面图片*/
    @Bind(R.id.ivIdInfo_other)
    ImageView ivIdInfo_other;
    /** 显示-半身照*/
    @Bind(R.id.ivIdInfo_haif)
    ImageView ivIdInfo_haif;
    /** 按钮效果-身份证下一步*/
    @Bind(R.id.tvIdInfoNext_three)
    TextView tvIdInfoNext_three;
    /***************** 行驶证 view ****************/
    @Bind(R.id.layoutVerifyDriver) View layoutVerifyDriver;
    /** 显示-行驶证图片*/
    @Bind(R.id.ivDriverInfo) ImageView ivDriverInfo;
    /** 显示-行驶证图片*/
    @Bind(R.id.tvDriverInfoTakePhoto) TextView tvDriverInfoTakePhoto;
    /** 按钮效果-行驶证下一步*/
    @Bind(R.id.tvDriverInfoNext) TextView tvDriverInfoNext;
    /***************** 银行认证 view ****************/
    @Bind(R.id.layoutBank) View layoutBank;
    /** 银行名称*/
    @Bind(R.id.TakeCar_etAccountWithDrawBankType) TextView TakeCar_etAccountWithDrawBankType;
    /** 金额*/
    @Bind(R.id.TakeCar_etDepositWithDrawBankNum)
    EditText TakeCar_etDepositWithDrawBankNum;
    /** 姓名*/
    @Bind(R.id.TakeCar_etDepositWithDrawBankName)
    EditText TakeCar_etDepositWithDrawBankName;
    /** 身份证号*/
    @Bind(R.id.TakeCar_etDepositWithDrawIdNumber)
    EditText TakeCar_etDepositWithDrawIdNumber;
    /** 按钮效果-银行认证下一步*/
    @Bind(R.id.bank_next) TextView bank_next;
    //ID
    String BankbankId = "";
/****************** 状态信息 view *****************/
    /** 审核中界面*/
    @Bind(R.id.user_layoutPromptStatus) View layoutPromptStatus;
    /** 审核成功界面*/
    @Bind(R.id.user_layoutCheckSuccess) View layoutCheckSuccess;
    /** 状态显示-验证流程第一步*/
    @Bind(R.id.user_ivVerifyStatus1) ImageView user_ivVerifyStatus1;
    /** 验证流程中间分割线1*/
    @Bind(R.id.user_tvVerifyDriver1) TextView user_tvVerifyDriver1;
    /** 状态显示-验证流程第二步*/
    @Bind(R.id.user_ivVerifyStatus2) ImageView user_ivVerifyStatus2;
    /** 验证流程中间分割线2*/
    @Bind(R.id.user_tvVerifyDriver2) TextView user_tvVerifyDriver2;
    /** 状态显示-验证流程第三步*/
    @Bind(R.id.user_ivVerifyStatus3) ImageView user_ivVerifyStatus3;
    /** 当前步骤*/
    private int currentStep;
    /** 当前步骤所属状态 currentStatus:1-已认证/0-未认证/2-认证中*/
    private int currentStatus;
    /** 选择本地图片路径*/
    private String currentImgLocalPath = "";
    private String currentImgUploadType;
    /** 身份证上传路径*/
    private String identificationUploadPath = "";
/**相应的照片编号*/
private int PhotoStatsNum=0;
    /**判断是否所有照片拍照*/
    private int PhotoStatsFirst=0;
    private int PhotoStatsSecond=0;
    private int PhotoStatsThreed=0;
    /** 身份上传信息路径*/
    private String identificationUploadPath_One = "";
    private String identificationUploadPath_Two = "";
    private String identificationUploadPath_Three = "";
    private Member member;
    @Override
    protected int getContentView() {
        return R.layout.ac_useraptitudeflow_information;
    }

    @Override
    protected void initView() {
        tvIdInfoNext_three.setClickable(false);
        bank_next.setClickable(false);
        topBar.showView(TopBar.LEFT_IMAGE_BTN, TopBar.TITLE);
        topBar.setImage(TopBar.LEFT_IMAGE_BTN, R.mipmap.ic_common_left);
        topBar.setLeftOnClick(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackPressed();
            }
        });
        //监听反馈信息
        TakeCar_etDepositWithDrawBankName.addTextChangedListener(new TextWatcher() {
            @Override
            public void beforeTextChanged(CharSequence s, int start, int count, int after) {

            }

            @Override
            public void onTextChanged(CharSequence s, int start, int before, int count) {
                String bankName = TakeCar_etDepositWithDrawBankName.getText().toString().trim();
                if (!StringUtils.isBlank(bankName) && !StringUtils.isBlank(s.toString())){
                    ViewUtil.GetViewShgape(bank_next);
                    bank_next.setClickable(true);
                    bank_next.setBackgroundResource(R.drawable.bg_btn_green_selector);
                    ViewUtil.SetViewShgape(bank_next);
                }else {
                    ViewUtil.GetViewShgape(bank_next);
                    bank_next.setClickable(false);
                    bank_next.setBackgroundResource(R.drawable.bg_btn_gray);
                    ViewUtil.SetViewShgape(bank_next);
                }
            }

            @Override
            public void afterTextChanged(Editable s) {

            }
        });
        TakeCar_etDepositWithDrawBankNum.addTextChangedListener(new TextWatcher() {
            @Override
            public void beforeTextChanged(CharSequence s, int start, int count, int after) {

            }

            @Override
            public void onTextChanged(CharSequence s, int start, int before, int count) {
                String bankNo = TakeCar_etDepositWithDrawBankNum.getText().toString().trim();
                if (!StringUtils.isBlank(bankNo) && !StringUtils.isBlank(s.toString())){
                    ViewUtil.GetViewShgape(bank_next);
                    bank_next.setClickable(true);
                    bank_next.setBackgroundResource(R.drawable.bg_btn_green_selector);
                    ViewUtil.SetViewShgape(bank_next);
                }else {
                    ViewUtil.GetViewShgape(bank_next);
                    bank_next.setClickable(false);
                    bank_next.setBackgroundResource(R.drawable.bg_btn_gray);
                    ViewUtil.SetViewShgape(bank_next);
                }
            }

            @Override
            public void afterTextChanged(Editable s) {

            }
        });
        TakeCar_etDepositWithDrawIdNumber.addTextChangedListener(new TextWatcher() {
            @Override
            public void beforeTextChanged(CharSequence s, int start, int count, int after) {

            }

            @Override
            public void onTextChanged(CharSequence s, int start, int before, int count) {
                String bankNo = TakeCar_etDepositWithDrawBankNum.getText().toString().trim();
                if (!StringUtils.isBlank(bankNo) && !StringUtils.isBlank(s.toString())){
                    ViewUtil.GetViewShgape(bank_next);
                    bank_next.setClickable(true);
                    bank_next.setBackgroundResource(R.drawable.bg_btn_green_selector);
                    ViewUtil.SetViewShgape(bank_next);
                }else {
                    ViewUtil.GetViewShgape(bank_next);
                    bank_next.setClickable(false);
                    bank_next.setBackgroundResource(R.drawable.bg_btn_gray);
                    ViewUtil.SetViewShgape(bank_next);
                }
            }

            @Override
            public void afterTextChanged(Editable s) {

            }
        });
    }

    @Override
    protected void initData() {
        member = DataCheckUtil.getMemberObj(mContext);
        //判断当前验证到哪一步
        /*currentStep = DataCheckUtil.getCurrentAuthStep(mContext)[1];
        currentStatus = DataCheckUtil.getCurrentAuthStep(mContext)[1];*/
        currentStep=1;
        currentStatus=0;
        Log.e("会员认证",currentStep+String.valueOf(currentStatus));
        showCurrentView();

    }

    /**
     * 显示相应界面的视图
     */
    private void showCurrentView(){
        setupTopBarTitle(currentStep);
        setupVerifyStepDriver(currentStep);
        setupVerifyContentView(currentStep);
    }
    @OnClick({R.id.tvDriverInfoTakePhoto,R.id.tvIdInfoTakePhoto_other, R.id.tvDriverInfoNext, R.id.tvIdInfoTakePhoto, R.id.tvIdInfoTakePhoto_haif,R.id.bank_next,R.id.tvIdInfoNext_three})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.tvIdInfoTakePhoto: //拍摄-身份证正面照
                PhotoStatsNum=1;
                PhotoStatsFirst=1;
                takePhoto();
                break;
            case R.id.tvIdInfoTakePhoto_other: //拍摄-身份证反面照
                PhotoStatsNum=2;
                PhotoStatsSecond=1;
                takePhoto();
                break;
            /*case tvIdInfoNext: //下一步身份证
                updateImage();
                break;*/
            case R.id.tvIdInfoTakePhoto_haif: //拍摄-半身照
                PhotoStatsNum=3;
                PhotoStatsThreed=1;
                takePhoto();
                break;
            /*case tvHalfBodyIdInfoNext: //下一步-半身照
                updateImage();
                break;*/
            case R.id.tvDriverInfoTakePhoto: //拍摄-驾照
                takePhoto();
                break;
            case R.id.tvDriverInfoNext: //下一步-驾照
                updateImage();
                break;
            case R.id.bank_next: //银行验证
                String bankNo = TakeCar_etDepositWithDrawBankNum.getText().toString().trim();
                String bankName = TakeCar_etAccountWithDrawBankType.getText().toString().trim();
                String userName= TakeCar_etDepositWithDrawBankName.getText().toString().trim();
                String IdNumber= TakeCar_etDepositWithDrawIdNumber.getText().toString().trim();
                TakeCar_submitTransaction(bankNo,bankName,userName,IdNumber);
                break;
            case R.id.tvIdInfoNext_three: //身份信息验证
                if(StringUtils.isBlank(identificationUploadPath_One)||StringUtils.isBlank(identificationUploadPath_Two)||StringUtils.isBlank(identificationUploadPath_Three)){
                    ToastUtil.showShort(mContext,"请先选择照片");
                    return;
               }else{
                    updateAllImageUse(identificationUploadPath_One,identificationUploadPath_Two,identificationUploadPath_Three);
                }
                break;
        }
    }
    @Override
    protected void onResume() {
        super.onResume();
        //刷新页面
        DataLoadUtil.refreshMemberData(mContext, new MemberCallBack() {
            @Override
            public void getMember(Member m) {
                member = m;
            }
        });
        setupVerifyContentView(currentStep);
    }

    /** 设置验证流程主内容*/
    private void setupVerifyContentView(int currentIndex) {
       // currentStatus == 1
        layoutCheckSuccess.setVisibility(View.GONE);
        layoutPromptStatus.setVisibility(View.GONE);
        switch (currentIndex){
            case 1:
                layoutVerifyIdentity.setVisibility(View.GONE);
                layoutVerifyDriver.setVisibility(View.GONE);
                layoutBank.setVisibility(View.VISIBLE);
                break;
            case 2:
                layoutVerifyIdentity.setVisibility(View.VISIBLE);
                layoutVerifyDriver.setVisibility(View.GONE);
                layoutBank.setVisibility(View.GONE);
                break;
            case 3:
                layoutVerifyIdentity.setVisibility(View.GONE);
                layoutVerifyDriver.setVisibility(View.VISIBLE);
                layoutBank.setVisibility(View.GONE);
                break;
        }
        if (member.member_auth_info.member_auth_status.equals("1")){          //已认证
            layoutVerifyIdentity.setVisibility(View.GONE);
            layoutVerifyDriver.setVisibility(View.GONE);
            layoutBank.setVisibility(View.GONE);
            layoutCheckSuccess.setVisibility(View.VISIBLE);
            layoutPromptStatus.setVisibility(View.GONE);
            user_tvVerifyDriver1.setBackgroundColor( getResources().getColor(R.color.main_blue));
            user_tvVerifyDriver2.setBackgroundColor(getResources().getColor(R.color.main_blue));

            user_ivVerifyStatus1.setBackgroundResource(R.drawable.bg_site_count_blue_shape);
            user_ivVerifyStatus2.setBackgroundResource(R.drawable.bg_site_count_blue_shape);
            user_ivVerifyStatus3.setBackgroundResource(R.drawable.bg_site_count_blue_shape);
        }else  if (member.member_auth_info.member_auth_status.equals("2")){    //认证中
            layoutVerifyIdentity.setVisibility(View.GONE);
            layoutVerifyDriver.setVisibility(View.GONE);
            layoutBank.setVisibility(View.GONE);
            layoutPromptStatus.setVisibility(View.VISIBLE);
            layoutCheckSuccess.setVisibility(View.GONE);
            user_tvVerifyDriver1.setBackgroundColor(getResources().getColor(R.color.main_blue));
            user_tvVerifyDriver2.setBackgroundColor(getResources().getColor(R.color.main_blue));

            user_ivVerifyStatus1.setBackgroundResource(R.drawable.bg_site_count_blue_shape);
            user_ivVerifyStatus2.setBackgroundResource(R.drawable.bg_site_count_blue_shape);
            user_ivVerifyStatus3.setBackgroundResource(R.drawable.bg_site_count_blue_shape);
        }
        /*else  if (member.member_auth_info.id_number_auth_status.equals("2")&&member.member_auth_info.id_number_with_people_auth_status.equals("2")
                &&member.member_auth_info.driving_license_auth_status.equals("2")&&member.member_auth_info.id_number_bank_status.equals("1")){                            //认证中---认证过
            layoutVerifyIdentity.setVisibility(View.GONE);
            layoutVerifyDriver.setVisibility(View.GONE);
            layoutBank.setVisibility(View.GONE);
            layoutPromptStatus.setVisibility(View.VISIBLE);
            layoutCheckSuccess.setVisibility(View.GONE);
            user_tvVerifyDriver1.setBackgroundColor(getResources().getColor(R.color.main_blue));
            user_tvVerifyDriver2.setBackgroundColor(getResources().getColor(R.color.main_blue));

            user_ivVerifyStatus1.setBackgroundResource(R.drawable.bg_site_count_blue_shape);
            user_ivVerifyStatus2.setBackgroundResource(R.drawable.bg_site_count_blue_shape);
            user_ivVerifyStatus3.setBackgroundResource(R.drawable.bg_site_count_blue_shape);
        }*/
    }

    /** 设置头部标题*/
    private void setupTopBarTitle(int currentIndex) {
        if(currentIndex == 1) { topBar.setText(TopBar.TITLE, getString(R.string.top_bar_bank_payment)); }
        if(currentIndex == 2) { topBar.setText(TopBar.TITLE, getString(R.string.top_bar_identification)); }
        if(currentIndex == 3) { topBar.setText(TopBar.TITLE, getString(R.string.top_bar_driver_information)); }
    }

    /** 设置验证流程中间分割线的显示*/
    private void setupVerifyStepDriver(int currentIndex) {
        user_tvVerifyDriver1.setBackgroundColor(currentIndex >= 2 ? getResources().getColor(R.color.main_blue) : getResources().getColor(R.color.car_gray));
        user_tvVerifyDriver2.setBackgroundColor(currentIndex >= 3 ? getResources().getColor(R.color.main_blue) : getResources().getColor(R.color.car_gray));

        user_ivVerifyStatus1.setBackgroundResource(currentIndex >= 1 ? R.drawable.bg_site_count_blue_shape : R.drawable.bg_site_count_gray_shape);
        user_ivVerifyStatus2.setBackgroundResource(currentIndex >= 2 ? R.drawable.bg_site_count_blue_shape : R.drawable.bg_site_count_gray_shape);
        user_ivVerifyStatus3.setBackgroundResource(currentIndex >= 3 ? R.drawable.bg_site_count_blue_shape : R.drawable.bg_site_count_gray_shape);
    }


    @Override
    public void onBackPressed() {
        super.onBackPressed();
    }
    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if(requestCode == 101 && resultCode == TakePhotoActivity.UPLOAD_SUCCESS) {
            if(data != null && data.getExtras() != null) {
                currentImgLocalPath = data.getExtras().getString("PATH");
                switch (currentStep){
                    case 2:
                        //三种状态填充照片，三张照片都有显示下部按钮
                        if(PhotoStatsNum==1){
                            MyApplication.getDefaultFinalBitmap(mContext).display(ivIdInfo_first, currentImgLocalPath);
                            updateImageUse(currentImgLocalPath,"2");
                        }
                        if(PhotoStatsNum==2){
                            MyApplication.getDefaultFinalBitmap(mContext).display(ivIdInfo_other, currentImgLocalPath);
                            updateImageUse(currentImgLocalPath,"2");
                        }
                        if(PhotoStatsNum==3){
                            updateImageUse(currentImgLocalPath,"3");
                            MyApplication.getDefaultFinalBitmap(mContext).display(ivIdInfo_haif, currentImgLocalPath);
                        }
                        if(PhotoStatsFirst==1&PhotoStatsSecond==1&PhotoStatsThreed==1){
                        //下一步按钮置为可点击状态
                        tvIdInfoNext_three.setBackgroundResource(R.drawable.bg_btn_green_shape_selector);
                        tvIdInfoNext_three.setClickable(true);
                        currentImgUploadType = Constants.IMAGE_TYPE_ID_NUM;}
                        break;
                    case 3:
                        MyApplication.getDefaultFinalBitmap(mContext).display(ivDriverInfo, currentImgLocalPath);
                        tvDriverInfoNext.setBackgroundResource(R.drawable.bg_btn_green_shape_selector);
                        currentImgUploadType = Constants.IMAGE_TYPE_DRIVER_ID;
                        tvDriverInfoTakePhoto.setText("点击进行重新拍照");
                        break;
                }
            }
        }
        if (requestCode == 100 && resultCode == RESULT_OK){
            TakeCar_etAccountWithDrawBankType.setText(data.getStringExtra("bank_name"));
            BankbankId = data.getStringExtra("bank_id");
        }
    }
    /**
     * 上传相应的图片
     * @param
     */
    private void updateImage() {
        if (StringUtils.isBlank(currentImgLocalPath)){
            ToastUtil.showShort(mContext,"请先选择照片");
            return;
        }
        new LHttpLib().editImage(mContext, memberId, "4", currentImgLocalPath, new BaseLHttpHandler(mContext, true, true) {
            @Override
            public void onSuccess(JSONStatus jsonStatus) {
                super.onSuccess(jsonStatus);
                final Image image = new Image().parse(jsonStatus.data.optJSONObject("image_info"));
                submitIdentificationCardInfo("",image.source);
            }
        });
    }
    /**
     * 上传身份信息图片
     * @param
     */
    private void updateImageUse(String Path,String currentImgUploadType) {
        if (StringUtils.isBlank(Path)){
            ToastUtil.showShort(mContext,"请先选择照片");
            return;
        }
        new LHttpLib().editImage(mContext, memberId, currentImgUploadType, Path, new BaseLHttpHandler(mContext, true, true) {
            @Override
            public void onSuccess(JSONStatus jsonStatus) {
                super.onSuccess(jsonStatus);
                final Image image = new Image().parse(jsonStatus.data.optJSONObject("image_info"));
                //获取身份证信息相关图片服务器地址
                if(PhotoStatsNum==1){
                    identificationUploadPath_One= image.source;
                }
                if(PhotoStatsNum==2){
                    identificationUploadPath_Two= image.source;
                }
                if(PhotoStatsNum==3){
                    identificationUploadPath_Three= image.source;
                }
            }
        });
    }
    /**
     * 上传所有身份信息
     * @param
     */
    private void updateAllImageUse(String Path1,String Path2,String Path3) {
        if (StringUtils.isBlank(Path1)||StringUtils.isBlank(Path2)||StringUtils.isBlank(Path3)){
            ToastUtil.showShort(mContext,"请先选择照片");
            return;
        }
        new LHttpLib().editMemberPcInfo(mContext, memberId, Path1, Path2, Path3,new BaseLHttpHandler(mContext, true, true) {
            @Override
            public void onSuccess(JSONStatus jsonStatus) {
                super.onSuccess(jsonStatus);
                showNextView();
            }
        });
    }
    /**
     * 更新相应的信息
     * @param value1  身份证
     * @param value2 半身照
     */
    void submitIdentificationCardInfo(String value1, String value2) {
        if (StringUtils.isBlank(value2)){
            ToastUtil.showShort(mContext,"请先选择照片");
            return;
        }
        new LHttpLib().submitIdentificationCardInfo(mContext, memberId, value1, value2, "", new BaseLHttpHandler(mContext, true, true) {
            @Override
            public void onSuccess(JSONStatus jsonStatus) {
                super.onSuccess(jsonStatus);
                //上传图片成功之后 将 currentImgLocalPath支空
                currentImgLocalPath = "";
                //showNextView();
                finish();
            }
        });
    }

    /**
     * 更新相应的信息
     * @param type
     * @param value
     */
    void updateImageInfo(String type, String value) {
        new LHttpLib().editMemberInfo(mContext, memberId, type, value, "", new BaseLHttpHandler(mContext, true, true) {
            @Override
            public void onSuccess(JSONStatus jsonStatus) {
                super.onSuccess(jsonStatus);
                //上传图片成功之后 将 currentImgLocalPath支空
                currentImgLocalPath = "";
                showNextView();
            }
        });
    }

    /**
     * 进入到下一个步骤界面
     */
    private void showNextView(){
        //进入下一个步骤
        runOnUiThread(new Runnable() {
            @Override
            public void run() {
                currentStep++;
               // currentStatus = DataCheckUtil.getCurrentStatusOfStep(mContext,currentStep);
                currentStatus=0;
                showCurrentView();
            }
        });
        //刷新数据
        DataLoadUtil.refreshMemberData(mContext, new MemberCallBack() {
            @Override
            public void getMember(Member member) {
                //监听审核全部通过
                if ("1".equals(member.member_auth_info.member_auth_status)){
                    prompt("恭喜您，审核通过！");
                    finish();
                }
            }
        });
    }
    /**
     * 开启拍照
     */
    private void takePhoto(){
        String ImageMessage="时间:"+ TimeUtil.getFormatTime()+"地点:"+""+"经纬度:";
        startActivityForResult(TakePhotoActivity.getTakePhotoStartIntent(mContext,
                DO_BIG_IMAGE, 1, 1, 640, 360), UPLOAD_IMG);
    }

    /*@Override
    protected void onDestroy() {
        super.onDestroy();
        //反注册EventBus
        EventBus.getDefault().unregister(this);
    }*/

    /**
     * 打开银行选择列表
     */
    @OnClick(R.id.TakeCar_etAccountWithDrawBankType)
    public void onViewClicked() {
        startActivityForResult(new Intent(mContext,BankListActivity.class),100);
    }
    /**
     *提交银行卡信息
     */
    private void TakeCar_submitTransaction(String bankNo,String bankName,String userName,String IdNumber){
        Member member = DataCheckUtil.getMemberObj(mContext);
        new LHttpLib().TakeCar_submitTransaction(mContext,userName,memberId,BankbankId,
                bankName,bankNo,IdNumber,new BaseLHttpHandler(mContext,true,true){
                    @Override
                    public void onSuccess(JSONStatus jsonStatus) {
                        super.onSuccess(jsonStatus);
                        runOnUiThread(new Runnable() {
                            @Override
                            public void run() {
                                prompt("银行卡认证通过");
                                showNextView();
                            }
                        });
                    }
                });
    }
}
